//
//  ECMaterailMangeTableViewCell.m
//  ECERP.CRM
//
//  Created by huanggulong on 2018/11/21.
//  Copyright © 2018 Mac. All rights reserved.
//

#import "ECMaterailMangeTableViewCell.h"

@interface ECMaterailMangeTableViewCell ()

@property (weak, nonatomic) IBOutlet UIImageView *photoView;
@property (weak, nonatomic) IBOutlet UILabel *nameLabel;

@property (weak, nonatomic) IBOutlet UILabel *unit1Label;

@property (weak, nonatomic) IBOutlet UILabel *unit2Label;

@property (weak, nonatomic) IBOutlet UILabel *modelLabel;
@property (weak, nonatomic) IBOutlet UILabel *amoutLabel;

@end


@implementation ECMaterailMangeTableViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    self.selectionStyle = UITableViewCellSelectionStyleNone;
}

- (void)setMaterial:(ECShopMaterial *)material{
    _material = material;
    _nameLabel.text = material.MaterialName?:@"--";
    _unit1Label.text = [NSString stringWithFormat:@"下单单位：%@", material.MaterialUnit?:@"--"];
    _unit2Label.text = [NSString stringWithFormat:@"下单单位：%@", material.SecondMaterialUnit?:@"--"];
    _modelLabel.text = [NSString stringWithFormat:@"规格：%@",material.MaterialModel?:@"--"];
    _amoutLabel.text = [NSString stringWithFormat:@"¥%@",material.YPurchasePrice?:@"0.00"];
}

@end
